
function observe(obj) {
    Object.keys(obj).forEach(key => {
        let dep = new Dep()
        let internval = obj[key]
        Object.defineProperty(obj, key, {
            get: function() {
                if (Dep.target) Dep.target.addDep(dep)
                return internval
            },
            set: function(val) {
                internval = val
                console.log('ss')
                dep.notify()
            }
        })
    })
}